/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.heyma.webapp;

import org.heyma.webapp.model.Cliente;
import org.heyma.webapp.srv.ClientesService;
import org.heyma.webapp.srv.IClientesService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author John
 */
public class Test {
    public static void main( String[] args ) {
        
        System.out.println(ApplicationContext.FACTORY_BEAN_PREFIX);
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
 
        IClientesService cs = ctx.getBean(ClientesService.class);
        
        Cliente cliente = new Cliente();
        cliente.setNombre("John Castillo");
        cliente.setDireccion("La Paz, Trigales #2096");        
        cliente.setNif("33442");
        
        cs.agregarNuevoCliente(cliente);
        
        System.out.println();
    }
}
